const { Sequelize } = require('sequelize');

//数据库
const dbName = "moyu_game";

//数据库地址
const host = "127.0.0.1";

//数据库服务端口
const port = "3306";

//数据库账号
const username = "root";
//数据库密码
const password = "root";

//数据库培训
const dbType = 'mysql'; /* 选择 'mysql' | 'mariadb' | 'postgres' | 'mssql' 其一 */



// 方法 2: 分别传递参数 (其它数据库)
const sequelize = new Sequelize(dbName, username, password, {
    host: host,
    port: port,
    dialect: dbType,
});

exports.sequelize = sequelize;
